<template>
  <div class="out-box">
    <el-row :gutter="20">
      <el-col :span="6">
        <el-card class="box-card">
          <template #header>
            <div class="card-header">
              <span>代码生成助手</span>
              <el-button type="primary" class="button" @click="cardHeaderClick(CardType.CODE_GEN)">进入</el-button>
            </div>
          </template>
          <div class="test item">提示消息</div>
        </el-card>
      </el-col>
      <el-col :span="6">
        <div class="grid-content ep-bg-purple"/>
      </el-col>
      <el-col :span="6">
        <div class="grid-content ep-bg-purple"/>
      </el-col>
      <el-col :span="6">
        <div class="grid-content ep-bg-purple"/>
      </el-col>
    </el-row>
  </div>
</template>
<script lang="ts" setup>
import {ref, reactive} from "vue"
import {router, codeGenR} from "@/router/Index"

const data = reactive({})

enum CardType {
  CODE_GEN
}

function cardHeaderClick(type: CardType) {
  switch (type) {
    case CardType.CODE_GEN:
      router.push({
        name: "代码生成-列表",
      })
      break;
  }
}

</script>

<style lang="scss" scoped>
.out-box {
  margin: 0 auto;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.text {
  font-size: 14px;
}

.item {
  margin-bottom: 18px;
}
</style>